<template>
    <div class="nonReturn_bg" v-if="show">
        <div class="nonReturn">
            <img class="nonReturn_close" :src="close" alt="" @click="show = false">
            <div class="nonReturn_box">
                <div class="box_top">
                    <img class="box_top_img" :src="icon_buhuanshuoming" alt="">
                </div>
                <div class="box_title">不还说明</div>
                <div class="box_text">
                    <div class="text_item">
                        <span class="text_item_label">主播部门：</span>
                        <span class="text_item_value">{{ lookData?.coreUserName }}</span>
                    </div>
                    <div class="text_item">
                        <span class="text_item_label">出库时间：</span>
                        <span class="text_item_value">{{ lookData?.outTime }}</span>
                    </div>
                    <div class="text_item">
                        <span class="text_item_label">选品数：</span>
                        <span class="text_item_value">{{ lookData?.totalOutNum || 0 }}件</span>
                    </div>
                    <div class="text_item">
                        <span class="text_item_label">实际归还：</span>
                        <span class="text_item_value">{{ lookData?.putNum || 0 }}件</span>
                    </div>
                    <div class="text_item">
                        <span class="text_item_label">不还说明：</span>
                        <span class="text_item_value">{{ lookData?.noPutRemark }}</span>
                    </div>
                </div>
            </div>
            <div class="nonReturn_footer">
                <div class="footer_button" @click="show = false">我知道了</div>
            </div>
        </div>
    </div>
</template>

<script setup lang="ts">
import { ref, defineExpose } from 'vue'
import close from '@/assets/approval/close.png'
import icon_buhuanshuoming from '@/assets/operation/icon_buhuanshuoming.png'

const show = ref(false)
const lookData = ref<any>({})

const init = (data: any) => {
    show.value = true
    lookData.value = data
}

defineExpose({ init })
</script>

<style lang="less" scoped>
.nonReturn_bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;

    .nonReturn {
        width: 80%;
        height: 60%;
        overflow: hidden;
        display: flex;
        flex-flow: column;
        position: relative;
        background: url('@/assets/operation/icon_erciquerenbeijing.png');
        background-repeat: no-repeat;
        background-color: #fff;
        border-radius: 5px;

        .nonReturn_close {
            position: absolute;
            top: 16px;
            right: 11px;
            width: 10px;
            height: 10px;
        }

        .nonReturn_box {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            padding: 33px 15px 0;
            box-sizing: border-box;

            .box_top {
                margin-bottom: 18px;
                display: flex;
                justify-content: center;

                .box_top_img {
                    width: 70px;
                    height: 70px;
                }
            }

            .box_title {
                margin-bottom: 20px;
                text-align: center;
                font-weight: 600;
                font-size: 16px;
                color: #1A1B1C;
            }

            .box_text {
                .text_item {
                    display: flex;
                    margin-bottom: 15px;

                    .text_item_label {
                        width: 75px;
                        font-weight: 400;
                        font-size: 14px;
                        color: #1A1B1C;
                    }

                    .text_item_value {
                        flex: 1;
                        min-width: 0;
                        font-weight: 400;
                        font-size: 14px;
                        color: #8492AD;
                        word-break: break-all;
                    }
                }
            }
        }

        .nonReturn_footer {
            padding: 20px 25px;
            box-sizing: border-box;

            .footer_button {
                width: 100%;
                height: 44px;
                background: #0094FF;
                border-radius: 23px;
                display: flex;
                align-items: center;
                justify-content: center;
                font-weight: 400;
                font-size: 16px;
                color: #FFFFFF;
            }
        }
    }
}
</style>